﻿
using PdfiumViewer;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Printing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
using System.Windows.Forms;

namespace rpt
{
    public partial class pdfprint : Form
    {
        public pdfprint()
        {
            InitializeComponent();
        }

        private void btnprint_Click(object sender, EventArgs e)
        {

        }

        public string GetPrinter()
        {
            var printer = string.Empty;
            var printDialog = new PrintDialog()
            {
                Document = new PrintDocument()
            };
            var dialogRet = printDialog.ShowDialog();
            if (dialogRet == System.Windows.Forms.DialogResult.OK || dialogRet == System.Windows.Forms.DialogResult.Yes)
            {
                printer = printDialog.Document.PrinterSettings.PrinterName;
            }
            return printer;
        }
    }
}
